package com.littlebee.storysuper.utils;

import android.os.Environment;

/**
 * 作者：liaoyong on 2016/7/13 08:14
 * 邮箱：liaoyong@tuliu.com
 * 描述：app配置类，提供所有host等的配置。
 */
public class Constant {
    /**极光IMkey*/
    public static final String JPUSH_KEY="c104cf53f79d6cd8dbd68b5b";
    public static final  String appName="motherapp";
    public static final int kTestType = 1; //为测试环境
    public static final int kReleaseType = 4; //为发布环境
    public static final int kEnvironmentType = 4;

    /** 不同环境路径：开发Dev(RAP)、TEST、预生产STAGE、生产PROD */
    private final static String ENVIRONMENT;//定义域名，比如：11.11.11.11：8888
    public final static String HOST;//ENVIRONMENT + server
    public final static String H5_HOST;//H5的host
    public final static String LAND_SERVER_HOST;//土地流转的host
    public final static String IM;//环信IM
    public static boolean JPUSH_ENABLE = false;//极光推送是否启用（false不启用 true启用  只能控制别名，不能控制全局通知 ）
    public static boolean WXPay_ENABLE = false;//极光推送是否启用（false不启用 true启用  只能控制别名，不能控制全局通知 ）
    public static String UPLOAD_PATH="http://47.92.37.125:9090/butel/HTTP";

    public static String UPLOAD_File_PATH="http://47.92.37.125:9090/piecefile/";

    static {
        if (kEnvironmentType == kReleaseType) {
            ENVIRONMENT = "http://47.92.37.125:9090";
            HOST = ENVIRONMENT + "/butel/cloudrecord";
            H5_HOST = "http://m.weixinpu.com.cn";
            LAND_SERVER_HOST = "http://10.10.66.32:51008/landService";
            IM = "http://10.10.66.31:51007/imMessages";
            JPUSH_ENABLE = false;
        } else if (kEnvironmentType == kTestType) {
            ENVIRONMENT = "http://192.168.1.101:8080";
            HOST = ENVIRONMENT + "/cloudrecord";
            H5_HOST = "http://m.weixinpu.com.cn";
            LAND_SERVER_HOST = "http://10.10.66.32:51008/landService";
            IM = "http://10.10.66.31:51007/imMessages";
            JPUSH_ENABLE = false;
        } else {
            ENVIRONMENT = "http://svr.tuliu.com";
            HOST = ENVIRONMENT + "/center";
            H5_HOST = "http://m.tuliu.com";
            LAND_SERVER_HOST = "http://pub-landsvc.tuliu.com/landService";
            IM = "http://pub-im.tuliu.com/imMessages";
            JPUSH_ENABLE = false;
        }
    }

    public static final int pageSize = 10;
    public static final String[] rateLevel = {"失望", "不满", "一般", "满意", "惊喜"};

    public static final String SHARE_USER_NAME = "USER";
    public static final int IS_TRADE_PASSWORD_SET = 1;


    /**
     * 拍照
     */
    public static final int PHOTO_REQUEST_TAKEPHOTO = 2;

    /**
     * 临时图片地址
     */
    public static final String srcPath = Environment.getExternalStorageDirectory()
            .getAbsolutePath()
            + "/cacheImage.jpg";


    /**
     * 从相册中选择
     */
    public static final int PHOTO_REQUEST_GALLERY = 3;

    public static String Login = HOST + "/login";

    public static String SEND_SMS_CODE = HOST + "/sendverify";

    public static String REGISTER = HOST + "/register";

    public static String SUBMIT_ORDER = HOST + "/publishorder";

    public static String ORDER_LIST = HOST + "/gethistoryorder_page";

    public static String SET_ORDER_STATUS = HOST + "/setorderstatus";

    public static String UPLOAD_FILE = ENVIRONMENT + "/butel/HTTP";

    public static String SUBMIT_FILE = HOST + "/addorderpieceinfo";

    public static String PRICE_LIST = HOST + "/getpriceinfo";

    public static String ORDER_DETAIL = HOST + "/getorderdescribe";

    public static String SERVICE_DETAIL = HOST + "/getcsinfo";

    public static String VerionUrl = HOST + "/getversioninfo";

    public static String ORDER_DEL = HOST + "/deleteorder";

    public static String ORDER_OPT_LIST = HOST + "/getunderorder_page";



    //*/

    /**
     * SharedPreferences Name
     */
    public static final String shareName = "USER";

    /**
     * 余额-我的账户余额
     */
    public static final String User_Balance = HOST + "/front/app/income/balance";

    public static final String caculateCommission = HOST + "/front/app/trade/caculateCommission";

    public final static String kRootPath = "/";
    public final static String kParentDirName = "motherapp";

    public static final String IM_CHILD_KEY = "f71de34f495d9c3b4a7b4365";
}
